<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/struts-dojo-tags" prefix="sx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改信息</title>
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">

var index = 0;
var diao = [{'type':'部门','id':'bumen'},{'type':'职务','id':'zhiwu'}];
	$(document).ready(function(){
		dy();
		
	});
	
	function dy(){
		if(index<diao.length){
			getDDL(diao[index].type,diao[index].id);
			setTimeout('dy()',100);
			index++;
		}
	}
	function getDDL(type,id){
		var date = new Date();
		$.getJSON("byTypeDDL.action",{"ddl.typeType":type,"date":date.getTime()},function(data){
			var o = "#"+id;
			var obj=$(o);
   		 for ( var i = 0; i < data.length; i++) {
   			 $(obj).append('<option value="'+data[i].id+'">'+data[i].value+'</option>');
			 }
		});
	}
</script>

<link href="../css/table.css" rel="stylesheet" type="text/css">
</head>
<body>
	
	<form action="updateUser.action" method="post">
	<table class="query_form_table">
		<input type="text" id="bumenid" value='<s:property value="#request.use.DDLByTypeDepartments.typeId"/>'/>
		<input type="text" id="zhiwuid" value='<s:property value="#request.use.DDLByTypeDuties.typeId"/>'/>
		<tr>
			<th>编号</th>
			<td><input readonly="readonly" id="cid"
				value="<s:property value="#request.use.usCid"/>" /></td>
		</tr>
		<tr>
			<th>工号</th>
			<td><input type="text" id="eid" name="user.usEmpid"
				value="<s:property value="#request.use.usEmpid"/>"><span
				class="red_star">*</span><br /></td>
		</tr>
		<tr>
			<th>姓名</th>
			<td><input type="text" id="ename" name="user.usEmpname"
				value="<s:property value="#request.use.usEmpname"/>"><span
				class="red_star">*</span></td>
		</tr>
		<tr>
			<th>部门</th>
			<td><select id="bumen" name="user.DDLByTypeDepartments.typeId">

			</select></td>
		</tr>
		<tr>
			<th>职务</th>
			<td><select id="zhiwu" name="user.DDLByTypeDuties.typeId">

			</select></td>
		</tr>
			<input type="hidden" id="upass" name="user.usPass"
				value="<s:property value="#request.use.usPass"/>"><span
				class="red_star">*</span>

		<tr>

			<td colspan="2" align="right"><input id="add"
			 type="submit" value="修改" /></td>

		</tr>
	</table>
</form>
	<a href="updatePass.jsp">修改密码</a>
</body>
</html>